using System;
using System.Collections.Generic;
using System.Text;

namespace Hoshimi
{
    public class ExplorerBot_RestState : State
	{
		#region Singleton

		// Fields
		protected static ExplorerBot_RestState instance;

		// Constructor
		protected ExplorerBot_RestState() : base() { }

		// Methods
		public static ExplorerBot_RestState Instance()
		{
			// Uses "Lazy initialization"
			if( instance == null ) 
				instance = new ExplorerBot_RestState();

			return instance;
		}

		#endregion

		public override bool Play( Unit unit ) 
        {
			ExplorerBot bot = (ExplorerBot) unit;
			
            bot.SetName("YumizzZZZzz");

            if (bot.HasNavigationObjectivePoint())
            {
				bot.StopIfMoving();
                unit.myStateMachine.ChangeState( ExplorerBot_MoveToNavigationState.Instance() );
                return false;
            }

			bot.MoveToOpponentAILocation();
            
			return true;
		}
	}
}
